import request from '@/utils/request';

/**
 * 查询停车场列表
 * @param {*} params 
 * @returns 
 */
export function getParkingList(params) {
  return request({
    url: '/parking/list',
    method: 'GET',
    params
  });
}

/**
 * 查询停车场详情
 * @param {*} parkingId 
 * @returns 
 */
export function getParkingDetail(parkingId) {
  return request({
    url: `/parking/${parkingId}`,
    method: 'GET'
  });
}

/**
 * 添加
 * @param {*} data 
 * @returns 
 */
export function addParking(data) {
  return request({
    url: '/parking',
    method: 'POST',
    data
  });
}



/**
 * 编辑
 * @param {*} data 
 * @returns 
 */
export function updateParking(data) {
  return request({
    url: '/parking',
    method: 'PUT',
    data
  });
}



/**
 * 删除
 * @param {*} parkingIds 
 * @returns 
 */
export function deleteParking(parkingIds) {
  return request({
    url: `/parking/${parkingIds}`,
    method: 'DELETE'
  });
}